import request from '@/utils/request'

export function getTreeListAPI() {
    return request({
      url: '/park/sys/permision/all/tree'
    })
  }

export function getRoleTreeDetail(roleId) {
    return request({
      url: `/park/sys/role/${roleId}`
    })
  }

export function getRoleUserAPI(roleId) {
    return request({
      url: `/park/sys/roleUser/${roleId}`
    })
  }
  export function createRoleUserAPI(data) {
    return request({
      url: `/park/sys/role`,
      method: 'POST',
      data
    })
  }

export  function deleteRoleUserAPI(id) {
    return request({
      url: `/park/sys/role/${id}`,
      method: 'DELETE'
    })
  }
export function updateRoleAPI(data) {
    return request({
      url: `/park/sys/role`,
      method: 'PUT',
      data
    })
  }

